// import Login from '../pages/Login'
// import Register from '../pages/Register'
// import Home from '../pages/Home'
// import UserList from '../pages/UserList'
// import CategoryList from '../pages/CategoryList'
// import RoleList from '../pages/RoleList'
// import ProductList from '../pages/ProductList'
// import Main from '../pages/Main'
// import NotFound from '../pages/NotFound'
// import UserDetail from '../pages/UserDetail'
// import UserDetail2 from '../pages/UserDetail2'

import AuthComponent from '../components/AuthComponent'
import {lazy} from 'react'
const Login=lazy(()=>import('../pages/Login'))
const Register=lazy(()=>import('../pages/Register'))
const Home=lazy(()=>import('../pages/Home'))
const UserList=lazy(()=>import('../pages/UserList'))
const CategoryList=lazy(()=>import('../pages/CategoryList'))
const RoleList=lazy(()=>import('../pages/RoleList'))
const ProductList=lazy(()=>import('../pages/ProductList'))
const Main=lazy(()=>import('../pages/Main'))
const NotFound=lazy(()=>import('../pages/NotFound'))
const UserDetail=lazy(()=>import('../pages/UserDetail'))
const UserDetail2=lazy(()=>import('../pages/UserDetail2'))
export default [
    {
        path:'/login',
        element:<Login/>
    },
    {
        path:'/register',
        element:<Register/>
    },
    {
        path:'/',
        element:<AuthComponent><Home/></AuthComponent>,
        children:[
            {
                index:true,
                element:<Main/>
            },
            {
                path:'userList',
                element:<UserList></UserList>
            },
            {
                path:'categoryList',
                element:<CategoryList></CategoryList>
            },
            {
                path:'roleList',
                element:<RoleList></RoleList>
            },
            {
                path:'productList',
                element:<ProductList/>
            },
            {
                path:'userDetail',
                element:<UserDetail/>
            },
            {
                path:'userDetail2/:id',
                element:<UserDetail2/>
            }
        ]
    },
    {
        path:'*',
        element:<NotFound/>
    }
]